#include<iostream>
using namespace std;
int main()
{
	int t;
	cin >> t;
	int x;
	while (t--) {
		cin >> x;
		cout << x + 1 << " " << 2 * x + 1 << endl;
	}
	return 0;
}